/*	kd:
	
	This checks the player's configuration, who might have a preference as to
	which cursor is used within menus. That's done by reading the vid_cursor
	cvar, which accepts that "none" means "use the one defined in gameinfo".
	"-" means "use system cursor", and we definitely cannot use that.
	
	*/

struct Gc_MenuPreference {
	static TextureId Cursor (PlayerInfo user) {
		let cvar_cursor = Cvar.FindCvar("vid_cursor");
		
		if(cvar_cursor) {
			let cursor_name = cvar_cursor.GetString();
			
			if(!(cursor_name ~== "None") && !(cursor_name ~== "-")) {
				let sprite = Gc_Sprite.Load(cursor_name);
				
				if(sprite.IsValid()) {
					return sprite;
				}
			}
		}
		
		// Use some fallback guaranteed to exist.
		return Gc_Sprite.Load("herecurs");
	}
}
